<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" href="<?php echo base_url(); ?>public/img/httt.jpg">
    <title><?php echo isset($title) ? $title : NULL; ?></title>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/normalize.css">
    <link rel="stylesheet" href="<?php echo base_url();?>public/css/foundation.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/app.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/calendar.css">
    <link rel="stylesheet" href="<?php echo base_url();?>public/foundation-icons/foundation-icons.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/hover.css">
    <link rel="stylesheet" href="<?php echo base_url();?>public/css/toggle-switch.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/modal.css">
    
    <script src="<?php echo base_url();?>public/js/jquery-min.js"></script>
    <script src="<?php echo base_url();?>public/js/jquery-ui-datepicker.min.js"></script>
    <script src="<?php echo base_url();?>public/js/vendor/modernizr.js"></script>
    <script src="<?php echo base_url();?>public/js/foundation.min.js"></script>
    <script src="<?php echo base_url();?>public/js/modal.js"></script>
    <script src="<?php echo base_url();?>public/js/jquery.form.js"></script>
    
  </head>
  <body>
    
    <div class="row">
      <div class="large-12 columns">
        <div class="panel">
          <a href="<?php echo base_url(); ?>trang-chu" title="Trang Chủ Khoa Hệ Thống Thông Tin"><img src="<?php echo base_url();?>public/img/banner_head.jpg" alt=""></a>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="large-12 columns">
        <nav class="top-bar" data-topbar>
          <ul class="title-area">
            <li class="name"><h1><a class="hover-shadow" href="<?php echo base_url();?>trang-chu" title="Trang Chủ"><img class="home" src="<?php echo base_url();?>public/img/home.png" alt="Trang Chủ"></a></h1></li>
            <li class="toggle-topbar menu-icon"><a href="#"><span class="menu">menu</span></a></li>
          </ul>

          <section class="top-bar-section">
            <ul class="left">
             <!--  <li class="divider"></li>
              <li><a href="#" class="trim">Tin Tức</a></li> -->

              <li class="divider"></li>
              <li class="has-dropdown">
                <a href="<?php echo base_url() ?>gioi-thieu" class="trim">Giới Thiệu</a>
                <ul class="dropdown">
                  <li class="divider"></li>
                  <li><a href="<?php echo base_url() ?>gioi-thieu"><h6 class="wobble-horizontal">Tổng Quan</h6></a></li>
                  <li class="divider"></li>
                  <li><a href="<?php echo base_url() ?>he-dao-tao"><h6 class="wobble-horizontal">Hệ Đào Tạo</h6></a></li>
                  <li class="divider"></li>
                  <li><a href="<?php echo base_url() ?>co-cau-to-chuc"><h6 class="wobble-horizontal">Cơ Cấu Tổ Chức</h6></a></li>
                </ul>
              </li>

              <?php
                if($this->session->userdata('active')){
                  if($this->session->userdata('level') == 1){
                    echo '<li class="divider"></li>
                          <li class="has-dropdown">
                            <a href="#" class="trim">Quản lý</a>
                            <ul class="dropdown">
                              <li class="divider"></li>
                              <li><a href="'.base_url().'employer/create-job"><h6 class="wobble-horizontal">Đăng công việc</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="#" data-reveal-id="myModal11"><h6 class="wobble-horizontal">Tạo nhân viên</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'employer/list_job"><h6 class="wobble-horizontal">Công việc thực tập đã đăng</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'employer/list_leader"><h6 class="wobble-horizontal">Quản lý nhân viên</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'employer/report"><h6 class="wobble-horizontal">Thống kê</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'employer/show_update_info"><h6 class="wobble-horizontal">Thông tin tài khoản</h6></a></li>
                            </ul>
                          </li>';
                    echo  '<div id="myModal11" class="reveal-modal remove-whitespace" data-reveal>
                            <form action="'.base_url().'employer/add_leader" method="post" data-abide accept-charset="utf-8">
                              <fieldset>
                              <legend>Thêm mới người hướng dẫn </legend>
                              <table class="job_info large-12 columns">
                                <tbody>
                                  <tr>
                                    <td class="first_col">Email đăng nhập:<small>*</small></td>
                                    <td>
                                      <font>'.form_error('email').'</font>
                                      <input class="radius" type="email" name="email"  value="" required placeholder="Your Email">
                                      <small class="error">This field must match the requirements</small>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td class="first_col">Mật khẩu:<small>*</small></td>
                                    <td>
                                      <font>'.form_error('password').'</font>
                                      <input class="radius" type="password" name="password"  value="" required placeholder="Your Password">
                                      <small class="error">This field must match the requirements</small>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td class="first_col">Tên người hướng dẫn:<small>*</small></td>
                                    <td>
                                      <font>'.form_error('name').'</font>
                                      <input class="radius" type="text" name="name"  value="" required pattern="[a-zA-Z]+" placeholder="Name">
                                      <small class="error">Name is required and must be a string</small>
                                    </td>
                                  </tr>   
                                </tbody>
                              </table>
                            </fieldset>
                              <button type="submit" class="radius">Submit</button>
                            </form>
                        </div>';
                  }else if($this->session->userdata('level') == 2){
                    echo '<li class="divider"></li>
                          <li class="has-dropdown">
                            <a href="#" class="trim">Quản lý</a>
                            <ul class="dropdown">
                              <li class="divider"></li>
                              <li><a href="'.base_url().'student/create_record"><h6 class="wobble-horizontal">Tạo hồ sơ</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'student/list_record"><h6 class="wobble-horizontal">Quản lý hồ sơ</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'student/list_job_apply"><h6 class="wobble-horizontal">Quản lý công việc</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'student/show_update_info"><h6 class="wobble-horizontal">Thông tin tài khoản</h6></a></li>
                            </ul>
                          </li>';
                  }elseif ($this->session->userdata('level') == 3) {
                    echo '<li class="divider"></li>
                          <li class="has-dropdown">
                            <a href="#" class="trim">Quản lý</a>
                            <ul class="dropdown">
                              <li class="divider"></li>
                              <li><a href="'.base_url().'leader/list_job_guide"><h6 class="wobble-horizontal">Nhận xét sinh viên</h6></a></li>
                              <li class="divider"></li>
                              <li><a href=""><h6 class="wobble-horizontal">Thông tin tài khoản</h6></a></li>
                            </ul>
                          </li>';
                  }else if($this->session->userdata('level') == 0){
                    echo '<li class="divider"></li>
                          <li class="has-dropdown">
                            <a href="#" class="trim">Quản trị</a>
                            <ul class="dropdown">
                              <li class="divider"></li>
                              <li><a href="'.base_url().'admin/user"><h6 class="wobble-horizontal">Tài khoản đăng nhập</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'admin/student"><h6 class="wobble-horizontal">Sinh viên</h6></a></li>
                              <li class="divider"></li>
                              <li><a href="'.base_url().'admin/employer"><h6 class="wobble-horizontal">Doanh nghiệp</h6></a></li>
                            </ul>
                          </li>';
                  }
                } 
              ?>

              <li class="divider"></li>
              <li><a href="#" class="trim">Liên Hệ</a></li>

              <li class="divider"></li>
              <li><a href="<?php echo base_url() ?>hoi-dap" class="trim">Hỏi Đáp</a></li>
            </ul>

              <?php
                if($this->session->userdata('active')){
                  echo '<div class="top_right_new">';
                  if($this->session->userdata('level') == 1){
                      if(strlen($this->session->userdata('ten_dn')) > 10){
                        $ten_dn = substr($this->session->userdata('ten_dn'), 0, 10).'...';
                      }else {
                        $ten_dn = $this->session->userdata('ten_dn');
                      }
                      echo 'Xin chào: <a class="signed float-shadow" href="'.base_url().'employer/show_update_info" title="'.$this->session->userdata('ten_dn').'">'.$ten_dn.'</a>';
                  }else if($this->session->userdata('level') == 2){
                      if(strlen($this->session->userdata('ten_sv')) > 10){
                        $ten_sv = substr($this->session->userdata('ten_sv'), 0, 10).'...';
                      }else {
                        $ten_sv = $this->session->userdata('ten_sv');
                      }
                      echo 'Xin chào: <a class="signed float-shadow" href="'.base_url().'student/show_update_info" title="'.$this->session->userdata('ten_sv').'">'.$ten_sv.'</a>';
                  }elseif ($this->session->userdata('level') == 3) {
                    if(strlen($this->session->userdata('ten_nv')) > 10){
                        $ten_nv = substr($this->session->userdata('ten_nv'), 0, 10).'...';
                      }else {
                        $ten_nv = $this->session->userdata('ten_nv');
                      }
                      echo 'Xin chào: <a class="signed float-shadow" href="" title="'.$this->session->userdata('ten_nv').'">'.$ten_nv.'</a>';
                  }else if($this->session->userdata('level') == 0){
                      $name = explode("@", $this->session->userdata('email'))[0];
                      echo 'Xin chào: <a class="signed float-shadow" href="">'.$name.'</a>';
                  }
                  echo '<span class="log"> -</span>
                        <a class="logout float-shadow" href="'.base_url().'logout">Đăng xuất</a>
                        </div>';
                }else {
                  echo '<div class="top_right">
                        <a class="logon buzz cd-signin" href="#0">Đăng Nhập</a>
                        <span class="log">/</span>
                        <a class="signup buzz cd-signup" href="#0">Đăng Ký</a>
                        </div>';
                }
              ?>

          </section>
        </nav>
      </div>
    </div>

    <!-- End test -->

    <div class="cd-user-modal"> <!-- this is the entire modal form, including the background -->
      <div class="cd-user-modal-container"> <!-- this is the container wrapper -->
        <ul class="cd-switcher">
          <li><a href="#0">Đăng nhập</a></li>
          <li><a href="#0">Đăng ký</a></li>
        </ul>

        <div id="cd-login"> <!-- log in form -->
          <form class="cd-form" method="post" action="<?php echo base_url() ?>login" accept-charset="utf-8">
            <p class="fieldset">
              <label class="image-replace cd-email" for="signin-email">E-mail</label>
              <input class="full-width has-padding has-border" id="signin-email" type="email" name="email" value="<?php echo set_value('email'); ?>" placeholder="E-mail">
              <span class="cd-error-message">Error message here!</span>
            </p>

            <p class="fieldset">
              <label class="image-replace cd-password" for="signin-password">Password</label>
              <input class="full-width has-padding has-border" id="signin-password" type="password" name="password" value="<?php echo set_value('password'); ?>"  placeholder="Password">
              <a href="#0" class="hide-password">Show</a>
              <span class="cd-error-message">Error message here!</span>
            </p>

            <!-- <p class="fieldset">
              <input type="checkbox" id="remember-me" checked>
              <label for="remember-me">Remember me</label>
            </p> -->

            <p class="fieldset">
              <input class="full-width" type="submit" value="Đăng nhập">
            </p>
          </form>
          
          <!-- <p class="cd-form-bottom-message"><a href="#0">Quên mật khẩu?</a></p> -->
          <!-- <a href="#0" class="cd-close-form">Close</a> -->
        </div> <!-- cd-login -->

        <div id="cd-signup"> <!-- sign up form -->
          <form class="cd-form">
            <!-- <p class="fieldset">
              <label class="image-replace cd-username" for="signup-username">Username</label>
              <input class="full-width has-padding has-border" id="signup-username" type="text" placeholder="Username">
              <span class="cd-error-message">Error message here!</span>
            </p>

            <p class="fieldset">
              <label class="image-replace cd-email" for="signup-email">E-mail</label>
              <input class="full-width has-padding has-border" id="signup-email" type="email" placeholder="E-mail">
              <span class="cd-error-message">Error message here!</span>
            </p>

            <p class="fieldset">
              <label class="image-replace cd-password" for="signup-password">Password</label>
              <input class="full-width has-padding has-border" id="signup-password" type="password"  placeholder="Password">
              <a href="#0" class="hide-password">Show</a>
              <span class="cd-error-message">Error message here!</span>
            </p>

            <p class="fieldset">
              <input type="checkbox" id="accept-terms">
              <label for="accept-terms">I agree to the <a href="#0">Terms</a></label>
            </p>

            <p class="fieldset">
              <input class="full-width has-padding" type="submit" value="Create account">
            </p> -->
            <div class="row">
              <div class="medium-12 columns">
                <div class="wrapper">
                  <label>Sign Up Now</label>
                  <a href="<?php echo base_url();?>register-student" class="inside">Sinh Viên</a>
                  <a href="<?php echo base_url();?>register-employer" class="inside">Doanh Nghiệp</a>
                </div>
              </div>
            </div>
          </form>

          <!-- <a href="#0" class="cd-close-form">Close</a> -->
        </div> <!-- cd-signup -->

        <div id="cd-reset-password"> <!-- reset password form -->
          <p class="cd-form-message">Quên mật khẩu? Xin vui lòng điền vào email đăng nhập. Bạn sẽ nhận được email khôi phục mật khẩu.</p>

          <form class="cd-form">
            <p class="fieldset">
              <label class="image-replace cd-email" for="reset-email">E-mail</label>
              <input class="full-width has-padding has-border" id="reset-email" type="email" placeholder="E-mail">
              <span class="cd-error-message">Error message here!</span>
            </p>

            <p class="fieldset">
              <input class="full-width has-padding" type="submit" value="Reset password">
            </p>
          </form>

          <p class="cd-form-bottom-message"><a href="#0">Back to log-in</a></p>
        </div> <!-- cd-reset-password -->
        <a href="#0" class="cd-close-form">Close</a>
      </div> <!-- cd-user-modal-container -->
    </div> <!-- cd-user-modal -->
   
  <div class="row body">
 
    <div class="large-9 columns">
       <?php echo $this->load->view($subview); ?>
    </div>
 
     
     
    <aside class="large-3 columns hide-for-small">

      <div id="search_form" class="search_form">
        <form action="<?php echo base_url(); ?>home/search" method="post" accept-charset="utf-8">
          <div class="primaryControls">
            <input id="search" type="search" results="s" name="search" placeholder="Tìm kiếm..." onfocus="show();">
          </div>

          <div id="secondaryControls" class="secondaryControls" style="display: none;">
            <span data-tooltip aria-haspopup="true" class="has-tip tip-top radius" title="Chọn thông tin cần tìm kiếm !">
              <div class="switch-toggle switch-2 panel">
                  <input id="week-d1" name="view-d" type="radio" value="cv" checked>
                  <label for="week-d1" onclick="">Công việc</label>
                  

                  <input id="month-d2" name="view-d" value="hs" type="radio">
                  <label for="month-d2" onclick="">Hồ sơ</label>

                  <a class="button"></a>
              </div>
            </span>
          </div>
          <div id="controls" class="controls" style="display: none;">
            <span data-tooltip aria-haspopup="true" class="has-tip tip-bottom radius" title="Tìm ngay !">
              <input id="button_search" class="button_search wobble-skew" type="submit" name="" value="Tìm kiếm">
            </span>
            <!-- <span data-tooltip aria-haspopup="true" class="has-tip tip-bottom radius" title="Tìm kiếm nâng cao !">
              <a id="button_search" href="#" class="button_search nc wobble-skew">Nâng cao...</a>
            </span> -->
          </div>
        </form>
      </div>

      <a href="#" class="button wobble-top" data-options="is_hover:true" data-dropdown="drop">Liên Kết &raquo;</a>
      <ul id="drop" class="f-dropdown" data-dropdown-content >
        <li><a class="wobble-horizontal" href="http://www.uit.edu.vn/" target="_blank">Trường ĐH CNTT</a></li>
        <li><a class="wobble-horizontal" href="https://daa.uit.edu.vn/" target="_blank">Phòng Đào Tạo</a></li>
        <li><a class="wobble-horizontal" href="http://forum.uit.edu.vn/" target="_blank">Forum ĐH CNTT</a></li>
        <li><a class="wobble-horizontal" href="http://cnpm.uit.edu.vn/vi/" target="_blank">Khoa CNPM</a></li>
        <li><a class="wobble-horizontal" href="http://ktmt.uit.edu.vn/" target="_blank">Khoa KTMT</a></li>
        <li><a class="wobble-horizontal" href="http://khmt.uit.edu.vn/index/index.php/vi/" target="_blank">Khoa KHMT</a></li>
        <li><a class="wobble-horizontal" href="http://mmt.uit.edu.vn/" target="_blank">Khoa MMT & Truyền Thông</a></li>
      </ul>
      <div id="calendar"></div>
      <table class="support">
        <thead>
          <tr>
            <th colspan="2">Hỗ trợ đăng tin thực tập</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="first_col"><img class="img_sp1" src="<?php echo base_url();?>public/img/call.jpg"></td>
            <td class="call_sp pulse"><a class"call_sp" href="#">083 725 2002</a></td>
          </tr>
          <tr>
            <td class="first_col"><img class="img_sp2" src="<?php echo base_url();?>public/img/email.jpg"></td>
            <td class="email_sp pulse"><a class="email_sp" href="#">info.httt@uit.edu.vn</a></td>
          </tr>
          <tr>
            <td class="first_col"><img class="img_sp3" src="<?php echo base_url();?>public/img/chat.jpg"></td>
            <td class="chat">
              <a href="ymsgr:sendIM?uit_ghost"><img class="buzz" src="<?php echo base_url();?>public/img/yahoo.png"></a>
              <a href="skype:UIT_GHOST?chat"><img class="buzz" src="<?php echo base_url();?>public/img/skype.png"></a>
            </td>
          </tr>
        </tbody>
      </table>

    </aside>
  </div>
  <footer class="row end">
    <div class="large-12 columns">
      <hr/>
      KHOA HỆ THỐNG THÔNG TIN - TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN <br>
      Địa chỉ : Đại học Công Nghệ Thông Tin, KM20 Xa lộ Hà Nội P.Linh Trung Q.Thủ Đức Tp.HCM - ĐT: 083 725 2002 (Ext: 119)<br>
      Email: info.httt@uit.edu.vn <br>
      Phát triển bởi : Khoa Hệ thống thông tin - UIT_GHOST.
    </div>
  </footer>
  <!-- Footer -->

    <script>
      $(document).foundation();
      $('#calendar').datepicker({
        inline: true,
        firstDay: 1,
        showOtherMonths: true,
        dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
      });
      function show(){
        document.getElementById("secondaryControls").style.display = "block";
        document.getElementById("controls").style.display = "block";
      }
      function hide(){
        document.getElementById("secondaryControls").style.display = "none";
        document.getElementById("controls").style.display = "none";
      }
      $('body').click(function(event) {
        if (!$(event.target).closest('#search_form').length) {
            $('#secondaryControls').hide();
            $('#controls').hide();
        };
      });
    </script>
  </body>
</html>
